<template>
  <ant-modal modalWidth="576" modalHeight="500" :visible="open" :modal-title="formTitle" :adjust-size="true" @cancel="cancel">
    <a-form-model ref="form" :model="form" :rules="rules" slot="content" layout="vertical">
      <a-row :gutter="32">
        <a-col :span="6" v-if="chooseUserDisabled">
          <a-form-model-item label="用户" prop="userId">
            <select-user v-model="form.userId" select-model="single" placeholder="请选择用户" />
          </a-form-model-item>
        </a-col>
        <a-col :span="18">
          <a-form-model-item label="评论" prop="pid">
            <select-comment v-model="form.pid" placeholder="请选择评论" status="1,4" :postId="form.postId"></select-comment>
          </a-form-model-item>
        </a-col>
        <a-col :span="24">
          <a-form-model-item label="帖子" prop="postId">
            <select-post v-model="form.postId" :disabled="choosePostDisabled" placeholder="请选择帖子"></select-post>
          </a-form-model-item>
        </a-col>
        <a-col :span="24">
          <a-form-model-item label="评论内容" prop="content">
            <a-textarea :rows="4" v-model="form.content" placeholder="请输入评论内容" />
          </a-form-model-item>
        </a-col>
      </a-row>
    </a-form-model>
    <template slot="footer">
      <a-button :disabled="disabled" @click="cancel"> 取消 </a-button>
      <a-button type="primary" :disabled="disabled" @click="submitForm(true)"> 保存 </a-button>
    </template>
  </ant-modal>
</template>
<script>
import CommentAddForm from './CommentForm'
export default {
  ...CommentAddForm
}
</script>
